package com.amit;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class RemoveFromCartServlet  extends HttpServlet{
	
	
	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
		
		//1.collect the data
		
		String bn=request.getParameter("bname");
		HttpSession session=request.getSession();
		session.removeAttribute(bn);
		
		RequestDispatcher rd=request.getRequestDispatcher("showcart.jlc");
		rd.forward(request, response);
		
		
		
	}
	

}
